﻿/*
 * @author: wizardc
 */

using DouEditor.Resource.Package;

namespace DouEditor.Resource
{
    /// <summary>
    /// 打安装包
    /// </summary>
    public class BuildStep_BuildPackage : BuildStepBase
    {
        protected override void Start()
        {
            var buildStepData = (BuildPackageStepData) _buildStepData;
            
            switch (buildStepData.platform)
            {
                case PlatformType.Windows:
                    new PackExe().Pack(buildStepData.buildRule);
                    break;
                case PlatformType.Android:
                    new PackApk().Pack(buildStepData.buildRule);
                    break;
                case PlatformType.iOS:
                    new PackIpa().Pack(buildStepData.buildRule);
                    break;
            }
            
            Complete();
        }
    }
}
